<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include href="master.html" />

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
    <title>Events | Yale Club Beijing</title>
    <script type="text/javascript">
    //<![CDATA[
    
    //]]>
    </script>
    <style type="text/css">
        .event{
            border-bottom: solid 1px #ccc;
        }
        .event div{
            margin: 5px 0px;
        }
        .eventtitle{
            margin:10px 0px;
        }
    </style>
</head>
<body>
<div py:if="event" class="event">
    <h1 class="eventtitle">${event.title} <img py:if="event.expired" src="/static/images/expired.png"/></h1>
    <h2 class="eventtimelocation">${event.time} @${event.location}</h2>
    <div class="eventsummary" py:content="event.summary"></div>
    <div class="eventdesc" py:content="HTML(event.desc)"></div>
</div>
<div py:if="not event" py:for="e in allevents" class="event">
    <h1 class="eventtitle">${e.title} <img py:if="e.expired" src="/static/images/expired.png"/></h1>
    <h2 class="eventtimelocation">${e.time} @${e.location}</h2>
    <div class="eventsummary" py:content="e.summary"></div>
    <div class="eventdesc" py:content="HTML(e.desc)"></div>
</div>
<div py:if="not event and not allevents">No events found.</div>
<p class="paginate" py:if="len(tg.paginate.pages) > 1">
	<b py:for="page in tg.paginate.pages">
        <a py:strip="page == tg.paginate.current_page" href="${tg.paginate.get_href(page)}" py:content="page"/>
    </b>
</p>
<div><a href="events?past=1">Show all events</a></div>
</body>
</html>
